
const Keypair = require('@solana/web3.js').Keypair;

// 你的私钥数组
const secretKey = new Uint8Array([253,116,62,64,91,216,68,26,251,47,16,140,197,176,46,33,212,97,72,163,16,88,146,11,234,68,27,232,117,87,243,242,104,5,14,56,106,30,197,110,100,197,169,13,13,91,217,176,99,238,143,41,17,204,73,117,239,146,32,254,239,178,144,196]);

// 创建 Keypair
const keypair = Keypair.fromSecretKey(secretKey);

// 获取 Base58 私钥（Phantom 可导入的格式）
const base58PrivateKey = keypair.secretKey.toString();
console.log(base58PrivateKey); // 类似 "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79Zv"